#include "PWM.h"
#include "p18f4550.h"
#include <delays.h>
void pwm_init(){



}

void pwm_run(){
ADCON0bits.GO_DONE = 1;//Start A/D Conversion
		
while(ADCON0bits.GO_DONE );//Loop here until A/D conversion completes
LATCbits.LATC7=1;
	Delay10TCYx(ADRESH);
LATCbits.LATC7=0;
	Delay10TCYx(255-ADRESH);
}